package com.nfit.shopadmin.mapper;

import com.nfit.shopmodel.dto.address.AddressDto;
import com.nfit.shopmodel.dto.user.UserInfoDto;
import com.nfit.shopmodel.entity.address.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName:AddressMapper
 * Package:com.nfit.shopadmin.mapper
 * Description
 *
 * @Author L
 * @Create 2024/12/28 15:23
 */
@Mapper
public interface AddressMapper {

   /**
    * 添加地址
    * @param address
    */
   void save(Address address);

   Address findByPhone(String phone);

   void update(UserInfoDto userInfoDto);

   List<Address> findByUserId(Long userId);

   /**
    * 根据ID查询地址详情信息
    */
   Address findById(Long id);

   void updateAddressById(@Param("addressDto") AddressDto addressDto,@Param("id") Long id);

   void saveAddress(AddressDto addressDto);

   void delete(Long id);
}
